package com.njupt.yanglonglong.report.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.njupt.yanglonglong.report.demo.entity.RUser;
import com.njupt.yanglonglong.report.demo.mapper.UserMapper;
import com.njupt.yanglonglong.report.demo.service.RUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author yangllong
 * @Date 2021/5/19 17:08
 */
@Service
public class RUserServiceImpl implements RUserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<RUser> getUserList() {
        return userMapper.selectList(new QueryWrapper<>());
    }

    @Override
    public List<RUser> getStuList() {
        QueryWrapper qw = new QueryWrapper<>();
        qw.eq("user_type", "2");
        return userMapper.selectList(qw);
    }
}
